﻿<ResourceDictionary 
    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
    xmlns:my2="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"  
    xmlns:dg="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" 
    xmlns:my1="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:toolkitDD="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:InteractChartLib"
 
    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
     
    >
        
    <Style TargetType="local:InteractChart">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:InteractChart">
                    <StackPanel Margin="5"  x:Name="MainPanelElement"  VerticalAlignment="Top" Orientation="Horizontal" >
                        <Border BorderThickness="1.2" Margin="0,0,10,10" BorderBrush="#FF63AADA" CornerRadius="4">
                        <toolkit:Expander Header=""   x:Name="GraphBuilderElement" ExpandDirection="Left" >
                            <toolkit:WrapPanel Margin="0,10,0,0"  x:Name="GraphBuilderWrap" Orientation="Vertical">
                            <TextBlock   Margin="0,0,0,5" Text="Graph type:" HorizontalAlignment="Left"/>
                                <ComboBox  x:Name="GraphTypeElement" Grid.Row="1"  />
                                <my2:Label Margin="0,10,0,5" Content="Independent column:"  HorizontalAlignment="Left"/>
                                <ComboBox x:Name="IndependentValueElementName"  />
                                <my2:Label Margin="0,10,0,5" Content="Dependent column:"  HorizontalAlignment="Left"/>
                                <ComboBox x:Name="DependentValueElementName"  />
                                <Button Margin="0,10,0,0" x:Name="BuildGraphElement"   Content="Build graph"  HorizontalAlignment="Right"/>
                                </toolkit:WrapPanel>
                        </toolkit:Expander>
                        </Border>
                            
                        <!--The main canvas which cointains all the controls used for the Chart -->
                        <Canvas x:Name="MainCanvasChartElement" >
                            <Canvas x:Name="ZoomPlusCursorElement"  Visibility="Collapsed" >
                                <Path Width="13.7708" Height="13.7717" Canvas.Left="0" Canvas.Top="0" Stretch="Fill" Fill="#FF000000" Data="F1 M 13.2365,10.6585L 10.22,7.6405C 10.5447,6.95007 10.7323,6.18042 10.7323,5.36584C 10.7323,2.40747 8.32526,0 5.36589,0C 2.40701,0 0,2.40747 0,5.36584C 0,8.3252 2.40701,10.7327 5.36589,10.7327C 6.17949,10.7327 6.94858,10.5452 7.64006,10.22L 10.6576,13.2369C 11.3695,13.95 12.5245,13.95 13.2365,13.2369C 13.949,12.5269 13.949,11.3695 13.2365,10.6585 Z M 5.36589,9.16901C 3.26842,9.16901 1.56322,7.46472 1.56322,5.36584C 1.56322,3.2699 3.26842,1.5636 5.36589,1.5636C 7.46286,1.5636 9.16916,3.2699 9.16916,5.36584C 9.16916,7.46472 7.46286,9.16901 5.36589,9.16901 Z "/>
                                <Path x:Name="plus" Width="5.06703" Height="5.06616" Canvas.Left="2.83237" Canvas.Top="2.83423" Stretch="Fill" Fill="#FF597FDB" Data="F1 M 7.24802,4.71637L 6.01736,4.71637L 6.01736,3.48468C 6.01736,3.12335 5.72583,2.83423 5.36589,2.83423C 5.00644,2.83423 4.7149,3.12335 4.7149,3.48468L 4.7149,4.71637L 3.48386,4.71637C 3.12442,4.71637 2.83237,5.00641 2.83237,5.36584C 2.83237,5.72528 3.12442,6.01825 3.48386,6.01825L 4.7149,6.01825L 4.7149,7.24786C 4.7149,7.60834 5.00644,7.90039 5.36589,7.90039C 5.72583,7.90039 6.01736,7.60834 6.01736,7.24786L 6.01736,6.01825L 7.24802,6.01825C 7.60788,6.01825 7.8994,5.72528 7.8994,5.36584C 7.8994,5.00641 7.60788,4.71637 7.24802,4.71637 Z "/>
                            </Canvas>
                            <Canvas x:Name="ZoomMinusCursorElement" Visibility="Collapsed" >
                                <Path Width="13.7712" Height="13.7709" Canvas.Left="0" Canvas.Top="0" Stretch="Fill" Fill="#FF000000" Data="F1 M 13.2365,10.6585L 10.22,7.6405C 10.5457,6.95007 10.7332,6.18042 10.7332,5.36584C 10.7332,2.40747 8.32524,0 5.36638,0C 2.408,0 0,2.40747 0,5.36584C 0,8.32623 2.408,10.7337 5.36638,10.7337C 6.17998,10.7337 6.94957,10.5462 7.64105,10.22L 10.6581,13.2369C 11.3705,13.9489 12.5255,13.9489 13.2365,13.2369C 13.9494,12.5259 13.9494,11.3695 13.2365,10.6585 Z M 5.36638,1.5636C 7.46335,1.5636 9.16905,3.2699 9.16905,5.36584C 9.16905,7.46472 7.46335,9.17004 5.36638,9.17004C 3.26941,9.17004 1.5636,7.46472 1.5636,5.36584C 1.5636,3.2699 3.26941,1.5636 5.36638,1.5636 Z "/>
                                <Path x:Name="minus" Width="5.06604" Height="1.30188" Canvas.Left="2.83336" Canvas.Top="4.71637" Stretch="Fill" Fill="#FF597FDB" Data="F1 M 7.2489,4.71637L 3.48434,4.71637C 3.12439,4.71637 2.83336,5.00641 2.83336,5.36584C 2.83336,5.72528 3.12439,6.01825 3.48434,6.01825L 7.2489,6.01825C 7.60837,6.01825 7.8994,5.72528 7.8994,5.36584C 7.8994,5.00641 7.60837,4.71637 7.2489,4.71637 Z "/>
                            </Canvas>
                            <Canvas x:Name="ZoomWindowCursorElement" Visibility="Collapsed"  >
                                <Rectangle x:Name="Rectangle" Width="9.75" Height="9.75" Canvas.Left="1.5" Canvas.Top="3.50812" Stretch="Fill" StrokeMiterLimit="2.75" Stroke="#FF0096FF"/>
                                <Path Width="16.0147" Height="13.8316" Canvas.Left="2.77601" Canvas.Top="0.153986" Stretch="Fill" Fill="#FF000000" Data="F1 M 18.4714,13.3243C 17.94,14.0485 16.9185,14.201 16.1947,13.6667L 11.955,10.5149C 10.3991,11.6683 8.29773,12.0117 6.37659,11.2367C 3.43681,10.0519 2.00743,6.69659 3.19308,3.75677C 3.76697,2.33179 4.8613,1.21643 6.27406,0.615295C 7.68735,0.0145874 9.24953,0 10.6725,0.574768C 12.0976,1.14752 13.2119,2.24146 13.8136,3.65424C 14.3937,5.0191 14.424,6.52222 13.9083,7.90717L 18.1296,11.0458C 18.8532,11.58 19.0067,12.6002 18.4714,13.3243 Z M 12.6484,7.56531C 13.0918,6.46509 13.0801,5.25696 12.6152,4.164C 12.1493,3.07208 11.2869,2.22626 10.1848,1.78241C 9.08542,1.33893 7.87587,1.35065 6.78532,1.81464C 5.692,2.27905 4.84569,3.14197 4.40125,4.24359C 3.48561,6.51642 4.58925,9.11139 6.86394,10.0286C 9.13623,10.9442 11.7303,9.84003 12.6484,7.56531 Z "/>
                            </Canvas>
                            <Rectangle x:Name="SelectionElement" 
                                 Fill="{TemplateBinding SelectionBkgBrush}"
    					                Opacity="{TemplateBinding SelectionBkgOpacity}"
                             />
                            <toolkitDD:DataPointSeriesDragDropTarget x:Name="MainChartDragDropElement" AllowDrop="true" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch">
                                <toolkitDD:Chart AllowDrop="True"   x:Name="MainChartElement"/>
                            </toolkitDD:DataPointSeriesDragDropTarget>
                        </Canvas>
                    </StackPanel>
                    
                    
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 </ResourceDictionary>
